TK!2
=v
#1
:n

:s
b
:c
   *** Automobile diagnostics ***
#3
:n
automobile
:s
b
:c
status of automobile (fit or faulty)
#4
:n
battery
:s
b
:c
status of battery (charged or flat)
#5
:n
carburetor
:s
b
:c
status of carburetor (clean or dirty)
#6
:n
wheels
:s
b
:c
wheel assembly (fit or faulty)
#7
:n
flwheel
:s
b
:c
front left wheel (intact or punctured)
#8
:n
frwheel
:s
b
:c
front right wheel (intact or punctured)
#9
:n
rlwheel
:s
b
:c
rear left wheel (intact or punctured)
#10
:n
rrwheel
:s
b
:c
rear right wheel (intact or punctured)
#11
:n
spare
:s
b
:c
spare wheel (available or missing)
=u
=l
#1
:n
bool
:v
1
0
E
#2
:n
cond
:v
'fit
'faulty
E
#3
:n
carb
:v
'clean
'dirty
E
#4
:n
wheels
:v
'intact
'punctured
E
#5
:n
spwhl
:v
'available
'missing
E
#6
:n
bat
:v
'charged
'flat
E
=f
#1
:n
fun
:c
automobile and wheel assembly
:t
List
:d
bool
:m
Table
:r
cond
#2
:n
fnb
:c
condition of battery
:t
List
:d
bool
:m
Table
:r
bat
#3
:n
fnc
:c
condition of carburetor
:t
List
:d
bool
:m
Table
:r
carb
#4
:n
fnw
:c
condition of wheel
:t
List
:d
bool
:m
Table
:r
wheels
#5
:n
fns
:c
availability of spare
:t
List
:d
bool
:m
Table
:r
spwhl
#1
:n
fun
#2
:n
fnb
#3
:n
fnc
#4
:n
fnw
#5
:n
fns
=r
#1
:r
"    * * *  Automobile Diagnostics,  Logical Relationships  * * *
:s
C
#2
:r
a = AND(b,c,w)           " automobile is fit when battery is charged,
#3
:r
                         " carburetor is clean and wheel assembly is fit
:s
C
#4
:r
w = OR(w4,AND(w3,s))     " wheel assembly is fit when four wheels are intact
#5
:r
                         " or three wheels are intact and spare is available
:s
C
#6
:r
w4 = AND(fl,fr,rl,rr)    " all four wheels are intact
#7
:r
                         " any three wheels are intact:
:s
C
#8
:r
w3 = OR(AND(fl,fr,rl),AND(fl,fr,rr),AND(fl,rl,rr),AND(fr,rl,rr))
#10
:r
"        * * *  Mapping of Symbolic to Boolean Variables  * * *
:s
C
#11
:r
automobile = fun(a)
#12
:r
battery = fnb(b)
#13
:r
carburetor = fnc(c)
#14
:r
wheels = fun(w)
#15
:r
flwheel = fnw(fl)
#16
:r
frwheel = fnw(fr)
#17
:r
rlwheel = fnw(rl)
#18
:r
rrwheel = fnw(rr)
#19
:r
spare = fns(s)
=p
=t
=n
=g
#1
:c
.000001
:i
10
:v
Yes
:l
60
:f
66
:m
0
:w
80
:b
Yes
:a
Yes
:r
Yes
:h
No
:t
1
:n
Yes
:d
LPT1
%Tr,f,0,1,0,1,0
